<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='bootstrap/css/bootstrap.css') }}">
    <script src="{{ url_for('static', filename='jQuery.js') }}"></script>
    <script src="{{ url_for('static', filename='popper.js') }}"></script>
    <script src="{{ url_for('static', filename='bootstrap/js/bootstrap.js') }}"></script>
    {% block head %}{% endblock %}
</head>
<body>
<div class="container">
    <nav>
        <h1>Demo</h1>
        <ul>
            {% if g.user %}
                <li><span>{{ g.user.Username }}</span></li>
                <li><a href="{{ url_for('auth.logout') }}">登出</a></li>
            {% else %}
                <li><a href="{{ url_for('auth.register') }}">注册</a>
                <li><a href="{{ url_for('auth.login') }}">登录</a>
            {% endif %}
        </ul>
    </nav>
    {% block content %}{% endblock %}
</div>
{% block js_tail %}{% endblock %}
</body>
</html>